package com.thoughtworks.opensource.yui.dd.server;

import com.google.gwt.user.server.rpc.RemoteServiceServlet;
import com.thoughtworks.opensource.yui.dd.client.DdService;
import com.thoughtworks.opensource.yui.dd.client.domain.MyNumberImpl;

/**
 * Created by IntelliJ IDEA.
 * Author: C. K. Sidu Ponnappa
 * Date: Nov 21, 2006
 * Time: 3:23:04 PM
 * ThoughtWorks India Pvt. Ltd.
 */
public class DdServiceImpl extends RemoteServiceServlet implements DdService {
    // Implementation of sample interface method
    public String getMessage(String msg) {
        return "Client said: \"" + msg + "\"<br>Server answered: \"Hi!\"";
    }

    public MyNumberImpl[] getNumbers(){
        MyNumberImpl[] myNumbers = new MyNumberImpl[10];
        for (int i = 0; i < 10; i++) {
            myNumbers[i] = new MyNumberImpl(i);
        }
        return myNumbers;
    }
}